package com.golden.management.domain;

import java.util.HashMap;
import java.util.Map;

public class ResultDO {
	
	public static final String FIRST_MODEL_KEY = "first_model";
	
	public static final  String SECOND_MODEL_KEY = "second_model";
	
	public static final  String THIRD_MODEL_KEY = "third_model";

	private boolean isSuccess = true;
	
	private Integer errorCode;
	
	private String errorMsg;
	
	private Map<String, Object> model = new HashMap<String, Object>();

	public boolean isSuccess() {
		return isSuccess;
	}

	public void setSuccess(boolean isSuccess) {
		this.isSuccess = isSuccess;
	}

	public Integer getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(Integer errorCode) {
		this.errorCode = errorCode;
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	public Map<String, Object> getModel() {
		return model;
	}

	public void setModel(Map<String, Object> model) {
		this.model = model;
	}

	public Object getModel(String key) {
		return model.get(key);
	}

	public void setModel(String key, Object value) {
		model.put(key, value);
	}

	@Override
	public String toString() {
		return "ResultDO [isSuccess=" + isSuccess + ", errorCode=" + errorCode + ", errorMsg=" + errorMsg + ", model="
				+ model + "]";
	}

	
}
